package com.ytjj.qmyx.mall.service.impl;

import com.ytjj.qmyx.mall.mapper.SpecialBannerDao;
import com.ytjj.qmyx.mall.model.SpecialBanner;
import com.ytjj.qmyx.mall.model.response.SpecialBannerResponse;
import com.ytjj.qmyx.mall.service.SpecialBannerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SpecialBannerServiceImpl implements SpecialBannerService {

    @Resource
    private SpecialBannerDao specialBannerDao;

    @Override
    public List<SpecialBannerResponse> getSpeBannerList(SpecialBanner request) {
        return specialBannerDao.getSpeBannerList(request);
    }

    @Override
    public List<SpecialBannerResponse> getSpeBannerListBySubjectId(Integer subjectId) {
        if (null == subjectId){
            subjectId = 68;
        }
        return specialBannerDao.getSpeBannerListBySubjectId(subjectId);
    }

    @Override
    public List<SpecialBannerResponse> bannerList() {
        return specialBannerDao.bannerList();
    }
}
